<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>

<iframe id="frame" style="width: 80px;"></iframe>
<script>
    var jsTestIsAsync = true;
    var iframe = document.getElementById('frame');
    var iframeDoc = iframe.contentWindow.document;

    iframeDoc.body.innerHTML = '<img id="srcset" srcset="resources/blue_rect.jpg 90w, resources/image-set-4x.png 120w">';

    xhtmlDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "xhtml", null);
    xhtmlDoc.documentElement.appendChild(iframeDoc.body);
    nullDoc = document.implementation.createDocument("", null);
    nullDoc.adoptNode(xhtmlDoc.documentElement);
    delete xhtmlDoc;
    delete nullDoc;
    setTimeout(function() {
        iframe.style.width = '100px';
        try{gc();}catch(e){};
        setTimeout(finishJSTest, 500);
    } , 500);
</script>
